<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" integrity="sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"tallgy.gitee.io","root":"/","images":"/images","scheme":"Muse","darkmode":false,"version":"8.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>
<meta name="description" content="安装sass使用sass，需要安装ruby，然后再安装sass 如果是webpack这种项目的，可以使用 npm 下载包 12345&quot;sass&quot;: &quot;^1.49.0&quot;,&quot;sass-loader&quot;: &quot;^7.1.0&quot;,上面这两个下载了就可以编译了还有一个是 node-sass，但是这个下载好像需要python环境，而且貌">
<meta property="og:type" content="article">
<meta property="og:title" content="sass预处理">
<meta property="og:url" content="http://tallgy.gitee.io/2021/10/27/%E6%B5%8F%E8%A7%88%E5%99%A8/sass%E9%A2%84%E5%A4%84%E7%90%86/index.html">
<meta property="og:site_name" content="tallgy&#39;s blog">
<meta property="og:description" content="安装sass使用sass，需要安装ruby，然后再安装sass 如果是webpack这种项目的，可以使用 npm 下载包 12345&quot;sass&quot;: &quot;^1.49.0&quot;,&quot;sass-loader&quot;: &quot;^7.1.0&quot;,上面这两个下载了就可以编译了还有一个是 node-sass，但是这个下载好像需要python环境，而且貌">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-10-27T08:05:34.000Z">
<meta property="article:modified_time" content="2023-06-25T08:57:29.338Z">
<meta property="article:author" content="tallgy">
<meta property="article:tag" content="css">
<meta property="article:tag" content="sass">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="http://tallgy.gitee.io/2021/10/27/%E6%B5%8F%E8%A7%88%E5%99%A8/sass%E9%A2%84%E5%A4%84%E7%90%86/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"http://tallgy.gitee.io/2021/10/27/%E6%B5%8F%E8%A7%88%E5%99%A8/sass%E9%A2%84%E5%A4%84%E7%90%86/","path":"2021/10/27/浏览器/sass预处理/","title":"sass预处理"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>sass预处理 | tallgy's blog</title>
  




  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">tallgy's blog</h1>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>







</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AE%89%E8%A3%85sass"><span class="nav-number">1.</span> <span class="nav-text">安装sass</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%AC%AC%E4%B8%80%E6%AD%A5%EF%BC%8C%E5%AE%89%E8%A3%85-ruby"><span class="nav-number">1.1.</span> <span class="nav-text">第一步，安装 ruby</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%84%B6%E5%90%8E%E5%B0%B1%E6%98%AF%E5%AE%89%E8%A3%85sass"><span class="nav-number">1.2.</span> <span class="nav-text">然后就是安装sass</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BD%BF%E7%94%A8"><span class="nav-number">1.3.</span> <span class="nav-text">使用</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BD%BF%E7%94%A8-sass"><span class="nav-number">2.</span> <span class="nav-text">使用 sass</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%B5%8C%E5%A5%97%E9%80%89%E6%8B%A9"><span class="nav-number">2.1.</span> <span class="nav-text">嵌套选择</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%9A%E4%B9%89%E5%8F%98%E9%87%8F"><span class="nav-number">2.2.</span> <span class="nav-text">定义变量</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#scss%E4%BD%BF%E7%94%A8%E7%88%B6%E5%85%83%E7%B4%A0-amp"><span class="nav-number">2.3.</span> <span class="nav-text">scss使用父元素 &amp;</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B7%B7%E5%85%A5-mixin"><span class="nav-number">2.4.</span> <span class="nav-text">混入 mixin</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">tallgy</p>
  <div class="site-description" itemprop="description">只是一个知识的搬运工</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">107</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">32</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">74</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://tallgy.gitee.io/2021/10/27/%E6%B5%8F%E8%A7%88%E5%99%A8/sass%E9%A2%84%E5%A4%84%E7%90%86/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="tallgy">
      <meta itemprop="description" content="只是一个知识的搬运工">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="tallgy's blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          sass预处理
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2021-10-27 16:05:34" itemprop="dateCreated datePublished" datetime="2021-10-27T16:05:34+08:00">2021-10-27</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2023-06-25 16:57:29" itemprop="dateModified" datetime="2023-06-25T16:57:29+08:00">2023-06-25</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/css/" itemprop="url" rel="index"><span itemprop="name">css</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/css/sass/" itemprop="url" rel="index"><span itemprop="name">sass</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h1 id="安装sass"><a href="#安装sass" class="headerlink" title="安装sass"></a>安装sass</h1><p>使用sass，需要安装ruby，然后再安装sass</p>
<p>如果是webpack这种项目的，可以使用 npm 下载包</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">&quot;sass&quot;: &quot;^1.49.0&quot;,</span><br><span class="line">&quot;sass-loader&quot;: &quot;^7.1.0&quot;,</span><br><span class="line">上面这两个下载了就可以编译了</span><br><span class="line"></span><br><span class="line">还有一个是 node-sass，但是这个下载好像需要python环境，而且貌似不需要也可以使用？但是对于这个sass的安装和环境的一些我还是不算很是理解清楚。</span><br></pre></td></tr></table></figure>



<h2 id="第一步，安装-ruby"><a href="#第一步，安装-ruby" class="headerlink" title="第一步，安装 ruby"></a>第一步，安装 ruby</h2><p>首先，我们得知道，Sass是基于Ruby开发的，所以要运行Sass都需要一个Ruby环境.</p>
<p>所以下面这个链接就是 ruby 的下载链接，如果下载速度慢，可以使用 迅雷来增加下载速度。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">http://www.ruby-lang.org/en/downloads/</span><br></pre></td></tr></table></figure>

<p>阿里云盘的链接， 阿里云盘应该挺快.</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">「rubyinstaller-devkit-2.7.5-1-x64.exe」https://www.aliyundrive.com/s/RXSr5Fh38uz</span><br><span class="line">点击链接保存，或者复制本段内容，打开「阿里云盘」APP ，无需下载极速在线查看，视频原画倍速播放。</span><br></pre></td></tr></table></figure>



<p>然后就是安装了</p>
<p>这里也直接给别人的安装链接</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https://www.cnblogs.com/padding1015/p/7133811.html</span><br></pre></td></tr></table></figure>

<p><strong>我就提几个重点</strong></p>
<ul>
<li><p>要添加到 Path，这样可以直接在cmd里面进行运行。</p>
</li>
<li><p>在最后一步之前 finish  <strong>ridk install</strong>  这个去掉，因为没有使用镜像，会比较慢，要引入镜像</p>
<ul>
<li><p>参考链接</p>
</li>
<li><p>```<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/mscf/article/details/82627951">https://blog.csdn.net/mscf/article/details/82627951</a></p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">  * 然后也就是 添加镜像，设置 gem 源了</span><br><span class="line"></span><br><span class="line">* 我这里记录链接里面的重点，怕到时候链接没了</span><br><span class="line"></span><br><span class="line">* ```</span><br><span class="line">  双击开始安装，选择全部安装；</span><br><span class="line">  在安装结束时，去除ridk install的选项，因为从默认的原去下载几百兆会非常缓慢；</span><br><span class="line">  查找Ruby安装目录下的msys64\etc\pacman.d，编辑更新源：</span><br><span class="line">  </span><br><span class="line">  Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686 加入mirrorlist.mingw32首位</span><br><span class="line">  Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64 加入mirrorlist.mingw64首位</span><br><span class="line">  Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch 加入mirrorlist.msys首位</span><br><span class="line">  </span><br><span class="line">  执行在命令行执行ridk install（如果安装时选择了不加入系统环境变量的，去Ruby安装目录的bin之下执行），一路回车至结束；</span><br><span class="line">  更新gem源：</span><br><span class="line">  gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/</span><br></pre></td></tr></table></figure></li>
</ul>
</li>
</ul>
<h2 id="然后就是安装sass"><a href="#然后就是安装sass" class="headerlink" title="然后就是安装sass"></a>然后就是安装sass</h2><p>先 <strong>gem env</strong> 了解一下安装了路径</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">参考资料：</span><br><span class="line">https://qastack.cn/programming/19072070/how-to-find-where-gem-files-are-installed</span><br><span class="line"></span><br><span class="line">https://guides.rubygems.org/command-reference/#gem_environment</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">注意： INSTALLATION DIRECTORY</span><br><span class="line">			GEM PATHS</span><br></pre></td></tr></table></figure>



<p>一波团灭</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">gem install sass</span><br><span class="line"></span><br><span class="line">然后准备回车就行了</span><br></pre></td></tr></table></figure>

<p>可能要等一会儿，我开始等了一会儿，没有反应，不知道是不是连接镜像查找的时候太久了。</p>
<p>不出意外是可以成功的，因为国内镜像我们在上一个blog上面设置好了的</p>
<h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><p>这个，一般搜一下怎么配置就行了</p>
<p>我的是 webstorm，所以好像当时自动配好了</p>
<h1 id="使用-sass"><a href="#使用-sass" class="headerlink" title="使用 sass"></a>使用 sass</h1><h2 id="嵌套选择"><a href="#嵌套选择" class="headerlink" title="嵌套选择"></a>嵌套选择</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">.aaa &#123;</span><br><span class="line">  xxx</span><br><span class="line">  </span><br><span class="line">  .bbb &#123;</span><br><span class="line">  	zzz</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>上面代码就是嵌套选择，就是代表下面的意思</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">.aaa &#123;</span><br><span class="line">	xxx</span><br><span class="line">&#125;</span><br><span class="line">.aaa .bbb &#123;</span><br><span class="line">	zzz</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<h2 id="定义变量"><a href="#定义变量" class="headerlink" title="定义变量"></a>定义变量</h2><p>可以定义变量，然后进行使用，所以对于相同属性的，可以直接使用变量，后续的修改也只需要修改一个就行。</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">$padding-sm: 5px;</span><br><span class="line"></span><br><span class="line">.a &#123;</span><br><span class="line">	padding: $padding-sm;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">同时 scss 支持在定义变量的时候使用 !default,来进行替换</span><br><span class="line">	简单来说就是，如果定义的变量在之前已经定义过了。那么便不会重新赋值。如果是第一次的，那么便会重新赋值。</span><br></pre></td></tr></table></figure>



<h2 id="scss使用父元素-amp"><a href="#scss使用父元素-amp" class="headerlink" title="scss使用父元素 &amp;"></a>scss使用父元素 &amp;</h2><p>​        scss  通过使用 &amp; 来代表了父元素</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">.box &#123;</span><br><span class="line">	&amp;:focus &#123; &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.box:focus &#123; &#125;</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">.box &#123;</span><br><span class="line">	&amp;-d &#123; &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.box-d &#123; &#125;</span><br></pre></td></tr></table></figure>

<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">.box h1 &#123;</span><br><span class="line">	#b &amp; &#123; &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">#b .box h1 &#123; &#125;</span><br></pre></td></tr></table></figure>

<p>​        并且如果使用了 &amp;，那么，解析会有不同</p>
<ul>
<li>正常的解析</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">.box &#123;</span><br><span class="line">	a &#123;&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.box a &#123;&#125;</span><br></pre></td></tr></table></figure>

<ul>
<li>使用了 &amp; 的解析，并不会变成查找 box 的内部，而是直接组成一个整体。</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">.box &#123;</span><br><span class="line">	&amp;-div &#123; &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.box-div &#123; &#125;</span><br></pre></td></tr></table></figure>



<h2 id="混入-mixin"><a href="#混入-mixin" class="headerlink" title="混入 mixin"></a>混入 mixin</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">@mixin aa &#123;</span><br><span class="line">	@content</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">@include aa() &#123;</span><br><span class="line">	color: red;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>​        并且混入可以携带参数。</p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/css/" rel="tag"># css</a>
              <a href="/tags/sass/" rel="tag"># sass</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2021/10/27/CSS/CSS-flex/" rel="prev" title="CSS-flex">
                  <i class="fa fa-chevron-left"></i> CSS-flex
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2021/10/29/JavaScript/%E9%9A%8F%E7%AC%94/JavaScript-%E5%86%92%E6%B3%A1%E5%92%8C%E6%8D%95%E8%8E%B7/" rel="next" title="JavaScript-冒泡和捕获">
                  JavaScript-冒泡和捕获 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">tallgy</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/muse.js"></script><script src="/js/next-boot.js"></script>

  





  





</body>
</html>
